@pie-element/explicit-constructed-response 11.1.1 → 11.1.2-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +4 -0
  4. package/dist/author/alternateResponses.d.ts +34 -0
  5. package/dist/author/alternateResponses.js +113 -0
  6. package/dist/author/alternateSection.d.ts +58 -0
  7. package/dist/author/alternateSection.js +213 -0
  8. package/dist/author/defaults.d.ts +186 -0
  9. package/dist/author/defaults.js +128 -0
  10. package/dist/author/ecr-toolbar.d.ts +41 -0
  11. package/dist/author/ecr-toolbar.js +100 -0
  12. package/dist/author/index.d.ts +42 -0
  13. package/dist/author/index.js +96 -0
  14. package/dist/author/main.d.ts +38 -0
  15. package/dist/author/main.js +291 -0
  16. package/dist/author/markupUtils.d.ts +14 -0
  17. package/dist/author/markupUtils.js +13 -0
  18. package/dist/author/utils.d.ts +9 -0
  19. package/dist/author/utils.js +7 -0
  20. package/dist/browser/author/index.js +3378 -0
  21. package/dist/browser/author/index.js.map +1 -0
  22. package/dist/browser/browser-BC3WygxE.js +360 -0
  23. package/dist/browser/browser-BC3WygxE.js.map +1 -0
  24. package/dist/browser/controller/index.js +4152 -0
  25. package/dist/browser/controller/index.js.map +1 -0
  26. package/dist/browser/delivery/index.js +96 -0
  27. package/dist/browser/delivery/index.js.map +1 -0
  28. package/dist/browser/dist-D5D48-XD.js +45656 -0
  29. package/dist/browser/dist-D5D48-XD.js.map +1 -0
  30. package/dist/browser/dist-D9ARZhQk.js +1426 -0
  31. package/dist/browser/dist-D9ARZhQk.js.map +1 -0
  32. package/dist/browser/explicit-constructed-response.css +2 -0
  33. package/dist/browser/main-B4lD1zyg.js +959 -0
  34. package/dist/browser/main-B4lD1zyg.js.map +1 -0
  35. package/dist/browser/print/index.js +40 -0
  36. package/dist/browser/print/index.js.map +1 -0
  37. package/dist/controller/defaults.d.ts +25 -0
  38. package/dist/controller/defaults.js +19 -0
  39. package/dist/controller/index.d.ts +64 -0
  40. package/dist/controller/index.js +139 -0
  41. package/dist/delivery/index.d.ts +20 -0
  42. package/dist/delivery/index.js +66 -0
  43. package/dist/delivery/main.d.ts +48 -0
  44. package/dist/delivery/main.js +115 -0
  45. package/dist/explicit-constructed-response.css +2 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.iife.d.ts +8 -0
  48. package/dist/index.iife.js +393 -0
  49. package/dist/index.js +2 -0
  50. package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -0
  51. package/dist/print/index.d.ts +15 -0
  52. package/dist/print/index.js +40 -0
  53. package/dist/runtime-support.d.ts +12 -0
  54. package/dist/runtime-support.js +12 -0
  55. package/package.json +94 -26
  56. package/CHANGELOG.json +0 -1102
  57. package/CHANGELOG.md +0 -2187
  58. package/LICENSE.md +0 -5
  59. package/README.md +0 -1
  60. package/configure/CHANGELOG.json +0 -652
  61. package/configure/CHANGELOG.md +0 -1928
  62. package/configure/lib/alternateResponses.js +0 -199
  63. package/configure/lib/alternateResponses.js.map +0 -1
  64. package/configure/lib/alternateSection.js +0 -329
  65. package/configure/lib/alternateSection.js.map +0 -1
  66. package/configure/lib/defaults.js +0 -184
  67. package/configure/lib/defaults.js.map +0 -1
  68. package/configure/lib/ecr-toolbar.js +0 -181
  69. package/configure/lib/ecr-toolbar.js.map +0 -1
  70. package/configure/lib/index.js +0 -161
  71. package/configure/lib/index.js.map +0 -1
  72. package/configure/lib/main.js +0 -514
  73. package/configure/lib/main.js.map +0 -1
  74. package/configure/lib/markupUtils.js +0 -70
  75. package/configure/lib/markupUtils.js.map +0 -1
  76. package/configure/lib/utils.js +0 -15
  77. package/configure/lib/utils.js.map +0 -1
  78. package/configure/package.json +0 -22
  79. package/controller/CHANGELOG.json +0 -517
  80. package/controller/CHANGELOG.md +0 -1344
  81. package/controller/lib/defaults.js +0 -23
  82. package/controller/lib/defaults.js.map +0 -1
  83. package/controller/lib/index.js +0 -368
  84. package/controller/lib/index.js.map +0 -1
  85. package/controller/package.json +0 -18
  86. package/docs/config-schema.json +0 -2629
  87. package/docs/config-schema.json.md +0 -1941
  88. package/docs/demo/config.js +0 -8
  89. package/docs/demo/generate.js +0 -20
  90. package/docs/demo/index.html +0 -1
  91. package/docs/demo/session.js +0 -10
  92. package/docs/pie-schema.json +0 -1130
  93. package/docs/pie-schema.json.md +0 -814
  94. package/lib/index.js +0 -91
  95. package/lib/index.js.map +0 -1
  96. package/lib/main.js +0 -205
  97. package/lib/main.js.map +0 -1
  98. package/lib/print.js +0 -71
  99. package/lib/print.js.map +0 -1
  100. package/module/configure.js +0 -1
  101. package/module/controller.js +0 -6534
  102. package/module/demo.js +0 -45
  103. package/module/element.js +0 -1
  104. package/module/index.html +0 -21
  105. package/module/manifest.json +0 -18
  106. package/module/print-demo.js +0 -83
  107. package/module/print.html +0 -18
  108. package/module/print.js +0 -1
package/configure.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from './dist/author/index.js';
2
+ export * from './dist/author/index.js';
package/controller.js ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/controller/index.js';
@@ -0,0 +1,4 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports);
3
+ //#endregion
4
+ export { e as __commonJSMin };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/configure/src/alternateResponses.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class AlternateResponses extends React.Component {
12
+ static propTypes: {
13
+ choicesErrors: PropTypes.Requireable<object>;
14
+ model: PropTypes.Validator<object>;
15
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
16
+ onLengthChange: PropTypes.Validator<(...args: any[]) => any>;
17
+ maxLengthPerChoiceEnabled: PropTypes.Validator<boolean>;
18
+ spellCheck: PropTypes.Requireable<boolean>;
19
+ pluginProps: PropTypes.Requireable<object>;
20
+ };
21
+ state: {
22
+ maxLengthPerChoice: any;
23
+ };
24
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
25
+ componentDidMount(): void;
26
+ updateChoicesIfNeeded: any;
27
+ getRemainingChoices: any;
28
+ onChoiceChanged: any;
29
+ onChoiceRemoved: any;
30
+ onSectionSelect: any;
31
+ onLengthChanged: any;
32
+ render(): React.JSX.Element;
33
+ }
34
+ export default AlternateResponses;
@@ -0,0 +1,113 @@
1
+ import e from "./alternateSection.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { cloneDeep as r, isEqual as i, map as a, reduce as o } from "@pie-element/shared-lodash";
5
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
+ //#region src/author/alternateResponses.tsx
7
+ var l = class extends t.Component {
8
+ static propTypes = {
9
+ choicesErrors: n.object,
10
+ model: n.object.isRequired,
11
+ onChange: n.func.isRequired,
12
+ onLengthChange: n.func.isRequired,
13
+ maxLengthPerChoiceEnabled: n.bool.isRequired,
14
+ spellCheck: n.bool,
15
+ pluginProps: n.object
16
+ };
17
+ state = { maxLengthPerChoice: r(this.props.model.maxLengthPerChoice) };
18
+ UNSAFE_componentWillReceiveProps(e) {
19
+ this.updateChoicesIfNeeded(e);
20
+ }
21
+ componentDidMount() {
22
+ this.updateChoicesIfNeeded(this.props);
23
+ }
24
+ updateChoicesIfNeeded = (e) => {
25
+ if (!this.state.choices || !i(this.state.choices, e.model.choices) || !i(e.model.choices, this.props.model.choices) || this.state.values && Object.keys(this.state.values).length !== Object.keys(this.props.model.choices).length || e.maxLengthPerChoiceEnabled !== this.props.maxLengthPerChoiceEnabled) {
26
+ let { choices: t, maxLengthPerChoice: n } = e.model, i = o(t, (t, n, r) => (n && (e.maxLengthPerChoiceEnabled || n.length > 1) && (t[r] = n[0]), t), {});
27
+ this.setState({
28
+ choices: e.model.choices,
29
+ values: i,
30
+ maxLengthPerChoice: r(n)
31
+ });
32
+ }
33
+ };
34
+ getRemainingChoices = (e) => {
35
+ let { choices: t } = this.state;
36
+ return o(t, (t, n, r) => (n && n.length === 1 && !e && t.push({
37
+ label: n[0].label,
38
+ value: r
39
+ }), t), []);
40
+ };
41
+ onChoiceChanged = (e, t) => {
42
+ let { onChange: n } = this.props, { choices: r } = this.state, i = r[t] || [], a = !i.find((t) => t.value === e.value), o = i.reduce((t, n) => {
43
+ let r = n.value === e.value ? e : n;
44
+ return t.push(r), t;
45
+ }, []);
46
+ a && o.push(e), n({
47
+ ...r,
48
+ [t]: o
49
+ });
50
+ };
51
+ onChoiceRemoved = (e, t) => {
52
+ let { onChange: n } = this.props, { choices: r } = this.state, i = (r[t] || []).reduce((t, n) => (n.value === e || t.push(n), t), []);
53
+ n({
54
+ ...r,
55
+ [t]: i
56
+ });
57
+ };
58
+ onSectionSelect = (e, t) => {
59
+ let { onChange: n } = this.props, { choices: r, values: i } = this.state;
60
+ r[t] && r[t].length > 1 ? e || n({
61
+ ...r,
62
+ [t]: [r[t][0]]
63
+ }) : this.setState({
64
+ choices: {
65
+ ...r,
66
+ [t]: [...r[t], {
67
+ label: "",
68
+ value: "1"
69
+ }]
70
+ },
71
+ values: {
72
+ ...i,
73
+ [t]: r[t][0]
74
+ }
75
+ });
76
+ };
77
+ onLengthChanged = (e, t) => {
78
+ let { model: n, onLengthChange: r } = this.props, { maxLengthPerChoice: i } = n;
79
+ i[t] = e, r(i);
80
+ };
81
+ render() {
82
+ let { choices: t } = this.state, { model: { maxLengthPerChoice: n, maxLengthPerChoiceEnabled: r }, spellCheck: i, choicesErrors: o, pluginProps: l } = this.props;
83
+ return /* @__PURE__ */ c("div", { children: [a(t, (t, a) => {
84
+ if (t && (r || t.length > 1)) {
85
+ let c = this.state.values[a];
86
+ return /* @__PURE__ */ s(e, {
87
+ value: c && c.value,
88
+ errors: o && o[a],
89
+ onSelect: (e) => this.onSectionSelect(e, a),
90
+ choiceChanged: (e) => this.onChoiceChanged(e, a),
91
+ choiceRemoved: (e) => this.onChoiceRemoved(e, a),
92
+ lengthChanged: (e) => this.onLengthChanged(e, a),
93
+ selectChoices: [c],
94
+ choices: t,
95
+ maxLength: n[a],
96
+ showMaxLength: r,
97
+ spellCheck: i,
98
+ pluginProps: l
99
+ }, a);
100
+ }
101
+ }), t && Object.keys(this.state.values).length !== Object.keys(t).length && /* @__PURE__ */ s(e, {
102
+ value: "",
103
+ onSelect: (e) => this.onSectionSelect(e, e.value),
104
+ choiceChanged: (e) => this.onChoiceChanged(e),
105
+ choiceRemoved: (e) => this.onChoiceRemoved(e),
106
+ selectChoices: this.getRemainingChoices(),
107
+ spellCheck: i,
108
+ pluginProps: l
109
+ })] });
110
+ }
111
+ };
112
+ //#endregion
113
+ export { l as default };
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/configure/src/alternateSection.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Choice extends React.Component {
12
+ static propTypes: {
13
+ error: PropTypes.Requireable<string>;
14
+ markup: PropTypes.Requireable<string>;
15
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
16
+ onDelete: PropTypes.Validator<(...args: any[]) => any>;
17
+ value: PropTypes.Requireable<string>;
18
+ spellCheck: PropTypes.Requireable<boolean>;
19
+ showMaxLength: PropTypes.Requireable<boolean>;
20
+ pluginProps: PropTypes.Requireable<object>;
21
+ };
22
+ state: {
23
+ value: any;
24
+ };
25
+ updateText: import("@pie-element/shared-lodash").CancelableFunction<any>;
26
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
27
+ onChange: any;
28
+ onKeyDown: any;
29
+ render(): React.JSX.Element;
30
+ }
31
+ export declare class AlternateSection extends React.Component {
32
+ static propTypes: {
33
+ choices: PropTypes.Requireable<any[]>;
34
+ selectChoices: PropTypes.Validator<any[]>;
35
+ errors: PropTypes.Requireable<object>;
36
+ onSelect: PropTypes.Validator<(...args: any[]) => any>;
37
+ choiceChanged: PropTypes.Validator<(...args: any[]) => any>;
38
+ lengthChanged: PropTypes.Requireable<(...args: any[]) => any>;
39
+ choiceRemoved: PropTypes.Validator<(...args: any[]) => any>;
40
+ value: PropTypes.Requireable<string>;
41
+ maxLength: PropTypes.Requireable<number>;
42
+ showMaxLength: PropTypes.Requireable<boolean>;
43
+ spellCheck: PropTypes.Requireable<boolean>;
44
+ pluginProps: PropTypes.Requireable<object>;
45
+ };
46
+ state: {};
47
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
48
+ componentDidMount(): void;
49
+ updateChoicesIfNeeded: any;
50
+ handleSelect: any;
51
+ onAddChoice: any;
52
+ onChoiceChanged: any;
53
+ onRemoveChoice: any;
54
+ getChoicesMaxLength: any;
55
+ changeLength: any;
56
+ render(): React.JSX.Element;
57
+ }
58
+ export default AlternateSection;
@@ -0,0 +1,213 @@
1
+ import { decodeHTML as e, getAdjustedLength as t, stripHtmlTags as n } from "./markupUtils.js";
2
+ import r from "react";
3
+ import i from "prop-types";
4
+ import { debounce as a, isEqual as o, max as s } from "@pie-element/shared-lodash";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { styled as u } from "@mui/material/styles";
7
+ import d from "@pie-lib/editable-html-tip-tap";
8
+ import f from "@mui/material/Button";
9
+ import p from "@mui/icons-material/Delete";
10
+ import m from "@mui/material/IconButton";
11
+ import h from "@mui/material/MenuItem";
12
+ import g from "@mui/material/Select";
13
+ import _ from "@mui/material/TextField";
14
+ //#region src/author/alternateSection.tsx
15
+ var v = u("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), y = u("div")(({ theme: e }) => ({
16
+ alignItems: "flex-start",
17
+ flexDirection: "column",
18
+ display: "flex",
19
+ paddingTop: e.spacing(2.5),
20
+ "& > *": {
21
+ marginBottom: e.spacing(2.5),
22
+ width: "100%"
23
+ }
24
+ })), b = u(d)(({ theme: e, hasError: t }) => ({
25
+ flex: "1",
26
+ marginRight: e.spacing(2.5),
27
+ ...t && {
28
+ border: `2px solid ${e.palette.error.main}`,
29
+ borderRadius: "6px"
30
+ }
31
+ })), x = u(m)(({ theme: e }) => ({ "& svg": { fill: e.palette.grey[600] } })), S = u("div")({
32
+ alignItems: "flex-end",
33
+ display: "flex",
34
+ justifyContent: "space-between",
35
+ width: "100%"
36
+ }), C = u("div")({
37
+ alignItems: "center",
38
+ display: "flex"
39
+ }), w = u(_)(({ theme: e }) => ({
40
+ width: "230px",
41
+ marginRight: e.spacing(2.5),
42
+ "& .MuiInput-underline:before": { borderBottomColor: e.palette.divider },
43
+ "& .MuiInput-underline:hover:not(.Mui-disabled):before": { borderBottomColor: e.palette.text.primary },
44
+ "& .MuiInput-underline:after": { borderBottomColor: e.palette.primary.main }
45
+ })), T = u("div")(({ theme: e }) => ({
46
+ fontSize: e.typography.fontSize - 2,
47
+ color: e.palette.error.main,
48
+ paddingTop: e.spacing(.5)
49
+ })), E = u("div")({
50
+ alignItems: "center",
51
+ display: "flex",
52
+ justifyContent: "space-between"
53
+ }), D = class extends r.Component {
54
+ static propTypes = {
55
+ error: i.string,
56
+ markup: i.string,
57
+ onChange: i.func.isRequired,
58
+ onDelete: i.func.isRequired,
59
+ value: i.string,
60
+ spellCheck: i.bool,
61
+ showMaxLength: i.bool,
62
+ pluginProps: i.object
63
+ };
64
+ state = { value: this.props.markup };
65
+ updateText = a(this.props.onChange, 300);
66
+ UNSAFE_componentWillReceiveProps(e) {
67
+ e.markup && this.setState({ value: e.markup });
68
+ }
69
+ onChange = (e) => {
70
+ let t = n(e);
71
+ this.setState({ value: t }), this.updateText(t);
72
+ };
73
+ onKeyDown = (e) => {
74
+ if (e.key === "Enter") return !0;
75
+ };
76
+ render() {
77
+ let { value: e } = this.state, { onDelete: t, spellCheck: n, error: i, showMaxLength: a, pluginProps: o } = this.props, s = a ? {} : { maxLength: 25 };
78
+ return /* @__PURE__ */ l(r.Fragment, { children: [/* @__PURE__ */ l(E, { children: [/* @__PURE__ */ c(b, {
79
+ hasError: !!i,
80
+ disableUnderline: !0,
81
+ onChange: this.onChange,
82
+ onKeyDown: this.onKeyDown,
83
+ markup: e || "",
84
+ activePlugins: ["languageCharacters"],
85
+ pluginProps: o,
86
+ languageCharactersProps: [{ language: "spanish" }],
87
+ spellCheck: n,
88
+ autoWidthToolbar: !0,
89
+ toolbarOpts: {
90
+ minWidth: "auto",
91
+ isHidden: !!o?.characters?.disabled
92
+ },
93
+ ...s
94
+ }), /* @__PURE__ */ c(x, {
95
+ "aria-label": "delete",
96
+ onClick: t,
97
+ size: "large",
98
+ children: /* @__PURE__ */ c(p, {})
99
+ })] }), i && /* @__PURE__ */ c(T, { children: i })] });
100
+ }
101
+ }, O = class extends r.Component {
102
+ static propTypes = {
103
+ choices: i.array,
104
+ selectChoices: i.array.isRequired,
105
+ errors: i.object,
106
+ onSelect: i.func.isRequired,
107
+ choiceChanged: i.func.isRequired,
108
+ lengthChanged: i.func,
109
+ choiceRemoved: i.func.isRequired,
110
+ value: i.string,
111
+ maxLength: i.number,
112
+ showMaxLength: i.bool,
113
+ spellCheck: i.bool,
114
+ pluginProps: i.object
115
+ };
116
+ state = {};
117
+ UNSAFE_componentWillReceiveProps(e) {
118
+ this.updateChoicesIfNeeded(e);
119
+ }
120
+ componentDidMount() {
121
+ this.updateChoicesIfNeeded(this.props);
122
+ }
123
+ updateChoicesIfNeeded = (e) => {
124
+ (!this.state.choices || !o(e.choices, this.state.choices) || !o(e.choices, this.props.choices)) && this.setState({ choices: e.choices });
125
+ };
126
+ handleSelect = (e) => {
127
+ let { onSelect: t, selectChoices: n } = this.props, { value: r } = e.target;
128
+ t(n.find((e) => e.value === r));
129
+ };
130
+ onAddChoice = () => {
131
+ let { choices: e } = this.state;
132
+ if (e.length && e[e.length - 1].label !== "") {
133
+ let t = s(e.map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
134
+ this.setState({ choices: [...e, {
135
+ value: `${t + 1}`,
136
+ label: ""
137
+ }] });
138
+ }
139
+ };
140
+ onChoiceChanged = (n, r, i) => {
141
+ let { choiceChanged: a, lengthChanged: o, maxLength: s, choices: c } = this.props, l = c.map((t) => e(t.label || "").length);
142
+ l[i] = e(r).length;
143
+ let u = Math.max(...l);
144
+ a({
145
+ ...n,
146
+ label: r
147
+ }), (u > s || u + 10 <= s) && o(t(u));
148
+ };
149
+ onRemoveChoice = (e) => {
150
+ let { choiceRemoved: t } = this.props;
151
+ t(e.value);
152
+ };
153
+ getChoicesMaxLength = () => {
154
+ let { choices: t } = this.state;
155
+ if (!t) return 1;
156
+ let n = t.map((t) => e(t.label || "").length);
157
+ return Math.max(...n);
158
+ };
159
+ changeLength = (e) => {
160
+ let { lengthChanged: t } = this.props, n = parseInt(e.target.value, 10), r = this.getChoicesMaxLength();
161
+ n && n >= r && n <= r + 10 && t(n);
162
+ };
163
+ render() {
164
+ let { selectChoices: t, maxLength: n, showMaxLength: r, value: i, spellCheck: a, errors: o, pluginProps: s } = this.props, { choices: u } = this.state, d = this.getChoicesMaxLength();
165
+ return /* @__PURE__ */ l(v, { children: [
166
+ /* @__PURE__ */ l(S, { children: [/* @__PURE__ */ l(g, {
167
+ variant: "standard",
168
+ displayEmpty: !0,
169
+ onChange: this.handleSelect,
170
+ value: i || "",
171
+ readOnly: r,
172
+ MenuProps: { transitionDuration: {
173
+ enter: 225,
174
+ exit: 195
175
+ } },
176
+ children: [/* @__PURE__ */ c(h, {
177
+ value: "",
178
+ children: /* @__PURE__ */ c("em", { children: i ? "Remove selection" : "Select a response" })
179
+ }), t.map((t, n) => /* @__PURE__ */ c(h, {
180
+ value: t?.value,
181
+ children: e(t?.label)
182
+ }, n))]
183
+ }), u && u.length > 0 && /* @__PURE__ */ l(C, { children: [n && r && /* @__PURE__ */ c(w, {
184
+ variant: "standard",
185
+ label: "Maximum length (characters)",
186
+ type: "number",
187
+ inputProps: {
188
+ min: d,
189
+ max: d + 10
190
+ },
191
+ value: n,
192
+ onChange: this.changeLength
193
+ }), /* @__PURE__ */ c(f, {
194
+ variant: "contained",
195
+ color: "primary",
196
+ onClick: this.onAddChoice,
197
+ children: "Add"
198
+ })] })] }),
199
+ o && o[0] && /* @__PURE__ */ c(T, { children: o[0] }),
200
+ /* @__PURE__ */ c(y, { children: u && u.map((e, t) => t > 0 && /* @__PURE__ */ c(D, {
201
+ markup: e.label,
202
+ onChange: (n) => this.onChoiceChanged(e, n, t),
203
+ onDelete: () => this.onRemoveChoice(e),
204
+ spellCheck: a,
205
+ error: o && o[t],
206
+ showMaxLength: r,
207
+ pluginProps: s
208
+ }, t)) })
209
+ ] });
210
+ }
211
+ };
212
+ //#endregion
213
+ export { O as default };
@@ -0,0 +1,186 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/configure/src/defaults.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ declare const _default: {
10
+ model: {
11
+ choices: {};
12
+ displayType: string;
13
+ markup: string;
14
+ maxLengthPerChoiceEnabled: boolean;
15
+ playerSpellCheckEnabled: boolean;
16
+ prompt: string;
17
+ promptEnabled: boolean;
18
+ rationale: string;
19
+ rationaleEnabled: boolean;
20
+ spellCheckEnabled: boolean;
21
+ studentInstructionsEnabled: boolean;
22
+ teacherInstructions: string;
23
+ teacherInstructionsEnabled: boolean;
24
+ toolbarEditorPosition: string;
25
+ responseAreaInputConfiguration: {};
26
+ };
27
+ configuration: {
28
+ baseInputConfiguration: {
29
+ h3: {
30
+ disabled: boolean;
31
+ };
32
+ html: {
33
+ disabled: boolean;
34
+ };
35
+ audio: {
36
+ disabled: boolean;
37
+ };
38
+ video: {
39
+ disabled: boolean;
40
+ };
41
+ image: {
42
+ disabled: boolean;
43
+ };
44
+ textAlign: {
45
+ disabled: boolean;
46
+ };
47
+ showParagraphs: {
48
+ disabled: boolean;
49
+ };
50
+ separateParagraphs: {
51
+ disabled: boolean;
52
+ };
53
+ };
54
+ prompt: {
55
+ settings: boolean;
56
+ label: string;
57
+ inputConfiguration: {
58
+ audio: {
59
+ disabled: boolean;
60
+ };
61
+ video: {
62
+ disabled: boolean;
63
+ };
64
+ image: {
65
+ disabled: boolean;
66
+ };
67
+ };
68
+ required: boolean;
69
+ };
70
+ partialScoring: {
71
+ settings: boolean;
72
+ label: string;
73
+ };
74
+ rationale: {
75
+ settings: boolean;
76
+ label: string;
77
+ inputConfiguration: {
78
+ audio: {
79
+ disabled: boolean;
80
+ };
81
+ video: {
82
+ disabled: boolean;
83
+ };
84
+ image: {
85
+ disabled: boolean;
86
+ };
87
+ };
88
+ required: boolean;
89
+ };
90
+ settingsPanelDisabled: boolean;
91
+ spellCheck: {
92
+ label: string;
93
+ settings: boolean;
94
+ enabled: boolean;
95
+ };
96
+ editSource: {
97
+ label: string;
98
+ settings: boolean;
99
+ enabled: boolean;
100
+ };
101
+ playerSpellCheck: {
102
+ label: string;
103
+ settings: boolean;
104
+ enabled: boolean;
105
+ };
106
+ teacherInstructions: {
107
+ settings: boolean;
108
+ label: string;
109
+ inputConfiguration: {
110
+ audio: {
111
+ disabled: boolean;
112
+ };
113
+ video: {
114
+ disabled: boolean;
115
+ };
116
+ image: {
117
+ disabled: boolean;
118
+ };
119
+ };
120
+ required: boolean;
121
+ };
122
+ template: {
123
+ inputConfiguration: {
124
+ audio: {
125
+ disabled: boolean;
126
+ };
127
+ video: {
128
+ disabled: boolean;
129
+ };
130
+ image: {
131
+ disabled: boolean;
132
+ };
133
+ h3: {
134
+ disabled: boolean;
135
+ };
136
+ blockquote: {
137
+ disabled: boolean;
138
+ };
139
+ };
140
+ };
141
+ maxLengthPerChoice: {
142
+ settings: boolean;
143
+ label: string;
144
+ };
145
+ maxResponseAreas: number;
146
+ maxImageWidth: {
147
+ teacherInstructions: number;
148
+ prompt: number;
149
+ rationale: number;
150
+ };
151
+ maxImageHeight: {
152
+ teacherInstructions: number;
153
+ prompt: number;
154
+ rationale: number;
155
+ };
156
+ withRubric: {
157
+ settings: boolean;
158
+ label: string;
159
+ };
160
+ mathMlOptions: {
161
+ mmlOutput: boolean;
162
+ mmlEditing: boolean;
163
+ };
164
+ language: {
165
+ settings: boolean;
166
+ label: string;
167
+ enabled: boolean;
168
+ };
169
+ languageChoices: {
170
+ label: string;
171
+ options: never[];
172
+ };
173
+ responseAreaInputConfiguration: {
174
+ inputConfiguration: {
175
+ characters: {
176
+ disabled: boolean;
177
+ };
178
+ };
179
+ };
180
+ spanishButton: {
181
+ settings: boolean;
182
+ label: string;
183
+ };
184
+ };
185
+ };
186
+ export default _default;